package org.example.hw.service;

import java.util.List;

import org.example.hw.exception.MyException;
import org.example.hw.model.Link;
import org.example.hw.model.User;

public interface LinkService {

	public Link save(Link link) throws MyException;

	public Link update(Link link) throws MyException;

	public void delete(Link id) throws MyException;

	public List<Link> findAll();

	public Link findById(Long id) throws MyException;

	public Link findLinkByUsernameAndCustomUrl(String username, String customUrl) throws MyException;

	public Link findLinkByCreatedByAndCustomUrl(String createdBy, String customUrl, User sessionUser)
			throws MyException;

	public Link findAnonmyousUserLink(String customUrl) throws MyException;

}
